home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-4543 / mvg / mod_code / mod_func.txt < prev    next >
Text File  |  1987-04-21  |  7KB  |  162 lines

  1.                            Module access to MVG:
  2.                            
  3.                                METHOD TWO
  4.                                
  5.                        (not available before v1.3)
  6.  
  7.  
  8.  
  9.  
  10.   All references to VIDEO are to the LOGICAL Video (ie LOGBASE not physbase)
  11.   All references to Long words that hold two values (ie MOUSE_XY) have
  12.     the first value in the high_word and the second value in the low_word.
  13.     sample: MOUSE_XY  X,Y in D0.L   high_word=X, low_word=Y
  14.     
  15.   AsciiZ String is a null terminated ASCII string: "Abcdef ghi",0
  16.   
  17.  
  18.   
  19.  
  20.  Func#      Label, Description and Return values (or register prep)
  21.  
  22.    0        GET_PTRS:   retrieves pointers to Variables.
  23.                         A0--> Varlist: long pointers to MVG's Vars
  24.                         
  25.                               offset   item.size
  26.                               
  27.                                 0       wid.W    byte width of image
  28.                                 4       hgt.W    height of image
  29.                                 8       pix.W    pixel width of image
  30.                                12       rez.L    micron info w,h (2 words)
  31.                                16       *
  32.                                20       mouse_xy.L  X,Y coords of Mouse...
  33.                                                     see WHEREM
  34.                                24       cbf.W    flag: 0 = CB Empty
  35.                                28       *
  36.                                32       int_in   pointers to MVG's
  37.                                36       addr_in       AES arrays
  38.                                40       int_out
  39.                                42       addr_out
  40.  
  41.  
  42.    1        GET_BUFS:   get details of main & CB buffers
  43.                         A0-->  MAIN buffer (image)
  44.                         D0.L = WID.HGT
  45.                         D1.L = Total size of buffer
  46.                         A2-->  ClipBoard  ( 0 if not allocated)
  47.                         
  48.    2        GET_CB:     get pointer to CB only
  49.                         A0--> ClipBoard ( or 0 if none)
  50.                         
  51.    3     copy VID2CB:   copies current video to ClipBoard
  52.    
  53.    4     copy VID2MAIN: copies current video to MAIN image buffer.
  54.                         This will also reset WID & PIX to 80 and 640
  55.                         Options include 4 pages within MAIN.
  56.                         Call with page number in D0.L
  57.                         will set HGT to 400xPAGE# if greater than current HGT
  58.                         
  59.    5     copy CB2MAIN:  copies the ClipBoard to MAIN buffer.
  60.                         Same options for paging as in function#4
  61.                         
  62.    6     copy MAIN2CB:  copies MAIN buffer to CB. Same options as #4 & #5
  63.                         (functions 4-6 expect the MAIN to be 640 pixels wide)
  64.                         
  65.    7     rsvd
  66.    
  67.    8     ANYKEY:        Waits for key. Returns keypress in D0.L
  68.    
  69.    9     WHEREM:        Polls mouse location and button status. (no wait)
  70.                         Returns mouse X,Y     in D1.L
  71.                                 button status in D0
  72.                                 (also stores x,y in MOUSE_XY)
  73.                                 
  74.   10     SETXY:         Sets X,Y for main image display
  75.                         call w/ D0.L = Tab.Row  
  76.                                 Tab = offset from left edge of image (8 pixel step)
  77.                                 Row = Top row for display (valid: 0 to hgt-380)
  78.   
  79.   11     GDISPLAY:      Display main image (using tab & row)
  80.   
  81.   12     DISPLAY_CB:    Display the ClipBoard
  82.   
  83.   13     TOPTITLE:      Print a text string centered in the menu bar area.
  84.                         Call w/  A0--> ASCIIZ string (null terminated)
  85.                         
  86.   14     HI_CHAR:       Print character in  D0.b
  87.   
  88.   15     HI_STRING:     Print string.  A0--> AsciiZ string
  89.   
  90.   16     PHEX1:         Print hexascii of byte in D0      (2-digit)
  91.   17     HEXIT:         Print hexascii of word in D0      (4-digit)
  92.   18     HEXITL:        Print hexascii of longword in D0  (8-digit)
  93.   
  94.   19     BDEC2:         Print decimal of byte in D0       (0-99)
  95.   20     BDEC3:         Print decimal of word in D0       (0-999)
  96.   21     BDEC4:         Print decimal of word in D0       (0-9999)
  97.   
  98.   22     GETMISC:       Get pointers to strings for ASKMISC (for f_sel)
  99.                         A0--> directory string (80 chars max)
  100.                         A1--> file string      (16 chars max)
  101.                         A2--> tot_pathspec (96 chars max)
  102.                         
  103.   23     ASKMISC:       Call F_SEL, ask for file.
  104.                         returns: D0.L = negative if error or blank
  105.                         builds full pathspec into string at  TOT_PATHSPEC
  106.                         
  107.   24    rsvd
  108.   25    rsvd
  109.   
  110.   26     COPYTOZ:       Copies an AsciiZ string... (until zero byte, inclusive)
  111.                         call w/  A0--> source string
  112.                                  A1--> destination
  113.                                  
  114.   27     APPENDTO:      Copies an AsciiZ string to the end of another.
  115.                         call w/  A0--> source string
  116.                                  A1--> destination string (anywhere before 0)
  117.                                  
  118.   28     ADDEXT:        Appends an extension onto a filename string.
  119.                         Searches for 'period', adds three chars afterward.
  120.                         If no period found then tacks on period.
  121.                         A0--> 3-character extension ("IMG" or "PI3" etc)
  122.                         A1--> filename (or full pathspec)
  123.                         
  124.   29   rsvd
  125.   30   rsvd
  126.  
  127.   31     SETMOUSEXY:    Sets mouse pointer to coordinates in D0.L
  128.   
  129.   32   rsvd
  130.   33   rsvd
  131.   34   rsvd
  132.   
  133.  
  134.    Graphic primitives
  135.  
  136.  
  137.   35     SETSIZE:       Sets up coordinates and size for lines and boxes.
  138.                         Call w/ D0= X coord
  139.                                 D1= Y coord
  140.                                 D2= width      (or X2 for line)
  141.                                 D3= height     (or Y2 for line)
  142.                                 
  143.   36     ATOG_NRM:      Set write mode to normal (replace)
  144.   37     ATOG_XOR:      Set write mode to exclusive_or
  145.   
  146.   38     MAKEBOX:       Draw a box. as defined with SETSIZE
  147.   39     MAKEXBOX:      Draw a box using XOR write mode.
  148.   40     SET_LINE:      Set up x1 y1 x2 y2 for line (d0-d3 = x,y,x2,y2)
  149.   41     MAKELINE:      Draw a line (d0-d3 = x,y x2,y2)
  150.   42     RECTANG_Q:     Draw a filled rectangle as defined with SETSIZE
  151.                         call with D0=  0 white
  152.                                        1 black
  153.                                        2 grey
  154.                                        3 xor
  155.  
  156.  
  157.                                       
  158.   43     STILLSEC:
  159.   44     EALERT:
  160.   
  161.   
  162.